{ "swagger": "2.0", "info": { "description": "AI Photo Search application, built during the Cloud and Big Data course at Columbia University.", "version": "1.0.0", "title": "AI Photo Search" }, "host": "qk6jg7ivod.execute-api.us-east-1.amazonaws.com", "basePath": "/beta", "schemes": [ "https" ], "paths": { "/search": { "get": { "operationId": "searchPhotos", "produces": [ "application/json" ], "parameters": [ { "name": "Access-Control-Allow-Origin", "in": "header", "required": false, "type": "string" }, { "name": "Access-Control-Allow-Headers", "in": "header", "required": false, "type": "string" }, { "name": "q", "in": "query", "required": false, "type": "string" }, { "name": "Access-Control-Allow-Methods", "in": "header", "required": false, "type": "string" } ], "responses": { "200": { "description": "200 response", "schema": { "$ref": "#/definitions/SearchResponse" }, "headers": { "Access-Control-Allow-Origin": { "type": "string" } } }, "403": { "description": "403 response", "schema": { "$ref": "#/definitions/Error" } }, "500": { "description": "500 response", "schema": { "$ref": "#/definitions/Error" } } } }, "options": { "produces": [ "application/json" ], "parameters": [ { "name": "Access-Control-Allow-Origin", "in": "header", "required": false, "type": "string" }, { "name": "Access-Control-Allow-Headers", "in": "header", "required": false, "type": "string" }, { "name": "Access-Control-Allow-Methods", "in": "header", "required": false, "type": "string" } ], "responses": { "200": { "description": "200 response", "headers": { "Access-Control-Allow-Origin": { "type": "string" }, "Access-Control-Allow-Methods": { "type": "string" }, "Access-Control-Allow-Headers": { "type": "string" } } }, "403": { "description": "403 response" }, "500": { "description": "500 response" } } } }, "/upload/{bucket}/{key}": { "put": { "produces": [ "application/json" ], "parameters": [ { "name": "Access-Control-Allow-Origin", "in": "header", "required": false, "type": "string" }, { "name": "Access-Control-Allow-Headers", "in": "header", "required": false, "type": "string" }, { "name": "x-amz-meta-customLabels", "in": "header", "required": false, "type": "string" }, { "name": "key", "in": "path", "required": true, "type": "string" }, { "name": "bucket", "in": "path", "required": true, "type": "string" }, { "name": "Access-Control-Allow-Methods", "in": "header", "required": false, "type": "string" } ], "responses": { "200": { "description": "200 response", "schema": { "$ref": "#/definitions/jsonmodel" }, "headers": { "Access-Control-Allow-Origin": { "type": "string" } } }, "403": { "description": "403 response" }, "500": { "description": "500 response" } } }, "options": { "consumes": [ "application/json" ], "produces": [ "application/json" ], "parameters": [ { "name": "Access-Control-Allow-Origin", "in": "header", "required": false, "type": "string" }, { "name": "Access-Control-Allow-Headers", "in": "header", "required": false, "type": "string" }, { "name": "Access-Control-Allow-Methods", "in": "header", "required": false, "type": "string" }, { "name": "bucket", "in": "path", "required": true, "type": "string" }, { "name": "key", "in": "path", "required": true, "type": "string" } ], "responses": { "200": { "description": "200 response", "headers": { "Access-Control-Allow-Origin": { "type": "string" }, "Access-Control-Allow-Methods": { "type": "string" }, "Access-Control-Allow-Headers": { "type": "string" } } } } } } }, "definitions": { "jsonmodel": { "type": "string" }, "Error": { "type": "object", "properties": { "code": { "type": "integer", "format": "int32" }, "message": { "type": "string" } } }, "Photo": { "type": "object", "properties": { "url": { "type": "string" }, "labels": { "type": "array", "items": { "type": "string" } } } }, "SearchResponse": { "type": "object", "properties": { "results": { "type": "array", "items": { "$ref": "#/definitions/Photo" } } } } } }